{% import "@WebsiteBundle/macros/pagination.html.twig" as macros %}
<div class="card vh-70 px-2">
	<div class="card-header d-flex">
	 <div class="w-100">
		共<span class="fontColorRed">{{ count }}</span>个收藏
	 </div>
	<div class="p-2 flex-shrink-1">
		<a href="{{ path('app_news_doClearFailure') }}" data-confirm="确认要清除失效收藏吗?" class="btn btn-sm btn-secondary ajaxDelete">清除失效收藏</a>
	</div>
	</div>
	<div class="card-body p-1">
		{% if list %}
			{% for item in list %}
				{% if item['img'] %}
					<div class="col-sm-12 col-lg-12 hover">
						<div class="card card-sm card-borderless border-bottom pb-1">
							<div class="row row-0">
								<div class="col-3 order-md-last">
									<img src="{{ json_get(item['img']) }}" class="w-100 h-100 object-cover card-img-start" alt="{{ item['title'] }}">
								</div>
								<div class="col">
									<div class="card-body p-1">
										<h3 class="card-title d-flex w-100 justify-content-between mt-1">
											{% if item['isDelete'] %}
												<del>
												{% endif %}
												<a href="{{ path('app_news_detail', {id:item['id']}) }}" class="h3 tracking-wide mb-1">{{ item['title'] }}</a>
												<small class="text-muted ms-3">{{ item['createdAtTime']|qtime }}</small>
												{% if item['isDelete'] %}
												</del>
											{% endif %}
							<a href="javascript:;" data-href="{{ path('app_news_doFav', {id:item['id']}) }}" class="text-muted hide hoverdo small ms-3">取消</a>
										</h3>
									</div>
								</div>
							</div>
						</div>
					</div>
				{% else %}
					<div class="col-sm-12 col-lg-12 hover">
						<div class="card  card-sm card-borderless border-bottom pb-1 ">
							<div class="row row-0">
								<div class="col-auto ">
									<div class="card-body p-1">
										<h3 class="card-title d-flex w-100 justify-content-between mt-1">
											{% if item['isDelete'] %}
												<del>
												{% endif %}
												<a href="{{ path('app_news_detail', {id:item['id']}) }}" class=" h3 tracking-wide mb-1">{{ item['title'] }}</a>
												<small class="text-muted ms-3">{{ item['createdAtTime']|qtime }}</small>
											{% if item['isDelete'] %}
												</del>
											{% endif %}
												<a href="javascript:;" data-href="{{ path('app_news_doFav', {id:item['id']}) }}" class="text-muted hide hoverdo small ms-3">取消</a>
										</h3>
									</div>
								</div>
							</div>
						</div>
					</div>
				{% endif %}
			{% endfor %}
			<div class="col-sm-12 col-lg-12 pagination ">
				{{ macros.pagination(pagination) }}
			</div>
		{% else %}
			{{ include('@WebsiteBundle/empty.html.twig',{msg:'数据为空!'}) }}
		{% endif %}
	</div>
</div>
